package com.springbootmybatiscurd.utils.uuid;
import java.util.UUID;
public class getMachineUUID {

/*public  String getMachineUUID(){
        try{
        Enumeration<NetworkInterface> networkInterfaces=NetworkInterface.getNetworkInterfaces();
        while(networkInterfaces.hasMoreElements()){
        NetworkInterface networkInterface=networkInterfaces.nextElement();
        byte[]mac=networkInterface.getHardwareAddress();
        if(mac!=null){
        StringBuilder sb=new StringBuilder();
        for(byte b:mac){
        sb.append(String.format("%02X",b));
        }
        return sb.toString();
        }
        }
        }catch(SocketException e){
        e.printStackTrace();
        }
        return null;
        }*/

        public  String getUUID() {
                UUID uuid = UUID.randomUUID();
                String uuidString = uuid.toString();

                return uuidString;
        }

}
